package com.fm.mediasoup.sdp;

import com.fm.mediasoup.json.RtcpFeedback;

public class RtcpFb {
    public RtcpFb(String payload, String type, String subtype) {
        this.payload = payload;
        this.type = type;
        this.subtype = subtype;
    }

    public RtcpFb(){}

    public String payload;
    public String type;
    public String subtype;

    @Override
    public String toString() {
        return "RtcpFb{" +
                "payload='" + payload + '\'' +
                ", type='" + type + '\'' +
                ", subtype='" + subtype + '\'' +
                '}';
    }

    /**
     * 将数据转换未 mediasoup 支持的格式
     * @return
     */
    public RtcpFeedback conversionRtcpFeedback(){
        RtcpFeedback rtcpFeedback = new RtcpFeedback();
        rtcpFeedback.type = this.type;
        rtcpFeedback.parameter = this.subtype;
        return rtcpFeedback;
    }
}
